package com.qf.gitadmin.dept.service.impl;

import com.qf.entity.dept.Dept;
import com.qf.gitadmin.dept.mapper.DeptMapper;
import com.qf.gitadmin.dept.service.DeptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Resource
    private DeptMapper deptDao;

    @Override
    public Dept selectById(Integer id) {
        return deptDao.selectDeptById(id);
    }

    @Override
    public List<Dept> selectAll() {
      return  deptDao.selectAllDept();
    }

    @Override
    public int insert(Dept dept) {
      return  deptDao.insertDept(dept);
    }

    @Override
    public int update(Dept dept) {
        return 0;
    }

    @Override
    public void delete(Integer id) {
        deptDao.deleteDeptById(id);

    }
}
